<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="bdregistro2.jsp"%>
    
    
<%
String pagina="";

if(request.getParameter("idd").toString()!="" && request.getParameter("fec_con")!="" && request.getParameter("confirmo")!="" && request.getParameter("n_pad2")!="" && request.getParameter("n_mad2")!="") 
{
	conecta();
	ResultSet c = consultar(cnn,"select * from bautizado2 where id_b='"+request.getParameter("idd")+"'");
	if(c.next()){
		ResultSet n = consultar(cnn,"update bautizado2 set fec_con='"+request.getParameter("fec_con")+"', confirmo='"+request.getParameter("confirmo")+"', pad_con='"+request.getParameter("n_pad2")+"', mad_con='"+request.getParameter("n_mad2")+"' where id_b='"+request.getParameter("idd")+"'");
		out.println("Se actualizo correctamente la bd");
		pagina="confirmacion.jsp";
	}else
	{
		out.println("no existe ese id");
		
	}
}else{out.println("no se permiten campos vacios");
pagina="uiregistrox.jsp";}
    
pageContext.forward(pagina);
%>


